Image recording simulation in a coordinate measuring machine

ABSTRACT

The present invention relates to a method for simulating an image recording by an optical sensor of a coordinate measuring machine for inspecting a measurement object, comprising the following steps: providing a first data set representing a model of the measurement object, a second data set representing a model of an illumination of the measurement object, and a third data set representing a model of an optics of the optical sensor, and rendering an image stack on the basis of the first data set, the second data set and the third data set, wherein the image stack has a plurality of virtual images of at least one partial region of the measurement object, wherein each virtual image is rendered at least with a different second and/or different third data set. Furthermore, the present invention relates to a method for optimizing an image recording by a coordinate measuring machine.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a Continuation application of International patent applicationPCT/EP2014/051050, filed Jan. 20, 2014, the contents of which areincorporated herein by reference.

BACKGROUND OF THE INVENTION

The present invention relates to a method for simulating an imaging ontoan optical sensor of a coordinate measuring machine for inspecting ameasurement object. Furthermore, the present invention relates to amethod for optimizing an illumination of a measurement object in acoordinate measuring machine with an optical sensor.

Coordinate measuring machines as such are generally known. They are usedin industrial applications for example for quality assurance ormeasuring components in retro-fit processes or other applications. Bymeans of the coordinate measuring machines, geometries and dimensions ofcomponents for the purpose thereof are measured with high accuracy.Various measuring methods differentiated, in principle, into so-calledtactile measuring methods and optical measuring methods may be used fordetermining the coordinates of the components.

Tactile measuring methods probe the component by means of a probeelement during the measuring process. By way of example, the probeelement is a probe sphere attached to one end of a probe pin. The probepin with the probe sphere may usually be arranged and aligned in anarbitrary orientation within a measurement area by means of a structuraldesign. By way of example, gantry designs, horizontal arm designs ortable designs are known for this purpose.

Optical measuring methods operate without contact, that is to say thatthe component to be measured, the measurement object, is recorded bymeans of an optical sensor, for example a camera, and the image datathus obtained are evaluated. A multiplicity of optical measuring methodsare known which differ not only in the manner of the image recording butalso in the manner of the illumination arrangement. By way of example,deflectometry methods, interferometric methods or chromatic methods,such as the white light sensor method, for example, are known. Theoptical measuring methods are often accompanied by an electronic imageprocessing and evaluation in order to extract the desired data from theimage recordings. Optical sensors may also be arranged in a freelymovable and orientable manner within a measurement area by means of astructural design such as a gantry design, horizontal arm design ortable design.

All of the abovementioned types of coordinate measuring machines andmeasuring methods should be understood to be merely by way of exampleand serve for introduction to the technical field of the presentinvention. The present invention is concerned with coordinate measuringmachines which use optical sensors.

In the case of such coordinate measuring machines with optical sensors,the illumination of a measurement object is of great importance for theaccuracy and thus the quality of the measurement. It is generallyendeavoured to achieve a homogeneous illumination of appropriatebrightness over the entire region of the image recording, in order to beable to detect all details of the measurement object with the highestpossible contrast. In this case, the brightness ranges which may beregarded as appropriate are dependent on the type of optical sensor andthe brightness ranges proccessible therein.

However, the setting of the illumination in practice requires a highdegree of experience on the part of the operating personnel of thecoordinate measuring machine or else is very time-consuming, sincepossibly one or more measurement passes with poor illumination areinitially carried out in order to iteratively approximate to the bestillumination. Consequently, the operator thus has to carry out aplurality of attempts before arriving at an appropriate illuminationwhich then yields only just usable measurement results. Generally, it istherefore endeavoured to minimize the required prior knowledge andexpenditure of time for setting an optimum illumination.

The document DE 10 2009 025 334 A1 discloses a method for ascertainingan ideal appearance of painted surfaces of components such as bodyworkcomponents. It is proposed that components to be provided with amultilayered paint are photographed and their optical impression afterhypothetical painting is calculated and represented by means of arendering program. An evaluation is then intended to be made to theeffect of whether this calculated optical impression is classified asattractive or not attractive. On the basis of this evaluation,parameters of the paint coating to be applied are then intended to bemodified and evaluated by means of recalculations possibly to beperformed until the optical impression is classified as “attractive”.

It is an object of the present invention to specify a possibility forsimplifying the setting of an illumination in a coordinate measuringmachine with an optical sensor.

BRIEF SUMMARY OF THE INVENTION

In accordance with a first aspect of the invention, therefore, a methodfor simulating an image recording by an optical sensor of a coordinatemeasuring machine for inspecting a measurement object, comprising thefollowing steps, is provided:

-   -   providing a first data set representing a model of the        measurement object, a second data set representing a model of an        illumination of the measurement object, and a third data set        representing a model of an optics of the optical sensor, and    -   rendering an image stack on the basis of the first data set, the        second data set and the third data set, wherein the image stack        has a plurality of virtual images of at least a partial region        of the measurement object, wherein each virtual image is        rendered at least with a different second and/or different third        data set.

This makes it possible to perform a complete simulation of the imagerecording of an object or object region using the methods of renderingon the basis of the object properties known in measurement technologyfrom CAD data. This measurement may be supported by one or more realmeasurements, as will be explained below.

The methods of rendering per se are known. The term “rendering” isfamiliar and a corresponding implementation by means of products thatare freely available commercially is possible. For the theoreticalprinciples, reference may be made for example to the book “PhysicallyBased Rendering—from Theory to Implementation” by Matt Pharr and GregHumphreys, 2nd edition, Morgan Kaufmann Publishers, 2010.

Regarding the implementation of lenses or optics of optical sensors thatis mentioned in the present application, reference may furthermore bemade to the technical article by Kolb, Mitchell and Hanrahan “ARealistic Camera Model for Computer Graphics”, Computer Graphics(“Proceedings of SIGGRAPH” 95), ACM SIGGRAPH, 1995, pages 317 to 324.

Furthermore, with regard to wavefront treatment or so-called“phase-retrieval”, reference may be made to the technical article“Phase-Retrieval Algorithms for a Complicated Optical System” by J. R.Fienup, Applied Optics, Volume 32, No. 10, 1993, pages 1737 to 1746.

A first step thus involves providing a first data set representing amodel of the measurement object, a second data set representing a modelof an illumination of the measurement object, and a third data setrepresenting a model of an optics of the optical sensor. These threedata sets contain the essential parameters for simulating the imagingonto the optical sensor of the coordinate measuring machine which arerequired for the rendering. The first data set may be provided forexample in the form of a CAD (Computer Aided Design) data set of themeasurement object. The third data set representing the model of anoptics or of a lens of the optical sensor may be provided for example inthe form of indications about the position and constitution of the usedlens elements and/or mirror elements of the lens, the position andsituation of the optical sensor and further variables that influence theoptical imaging path. By way of example, a customary tabular indicationof radii of curvature, distances between the individual surfaces andused materials with refractive index and Abbe number is possible, as isproposed in the article by Kolb et al. The second data set describingthe illumination of the coordinate measuring machine may be provided forexample by location and constitution of the light sources, theiremission angles, light intensity profiles, etc. In the step ofrendering, it thus becomes possible to calculate a virtual image of themeasurement object, said virtual image being imaged onto the opticalsensor of the coordinate measuring machine, with predefinedillumination.

Furthermore, a fourth data set may additionally be provided, whichrepresents a model of a conversion of the photon flux or light incidenton the optical sensor into electrical signals, wherein the electricalsignals are in particular electrical signals that are graphicallyrepresentable, processable in a computer-aided manner and storable. Bymeans of a fourth data set, it is thus possible to take account of theprocessing of the measurement signal over and above the optical imaging.By way of example, it is possible in this way to take account of apixilation of the optical sensor, a wave dependence of the sensitivityof the optical sensor and other variables that influence thetransmission path between the optical imaging and the electrical signal.

The term “optical sensor” denotes a unit for the spatially resolvedand/or directionally resolved detection of the photon flux emerging fromthe illuminated measurement object.

Furthermore, it becomes possible to calculate an image stack. Such an“image stack” is a set of a plurality of images of the same measurementobject or of the same partial region of a measurement object which arecalculated in the case of different parameter sets for at least one ofthe second data set, the third data set and the fourth data set. By wayof example, as a parameter a position of a focal plane may be alteredhere by changing the focus setting of the lens and/or by changing thedistance between lens and measurement object.

This makes it possible to calculate a plurality of respective imagerecordings with respectively different parameters of the imagerecording. If only a variation of spatial parameters is performed, thisimage stack may extend in an extended fashion for example along theoptical axis of the lens, wherein the images are in each caseperpendicular to the optical axis, provided that no image plane tiltsare provided, for example for complying with the Scheimpflug condition.However, alternatively or cumulatively, a variation of parameters of theillumination, parameters of the positioning of the optical sensorrelative to the measurement object, the size and position of the partialregion of the measurement object, etc. may for example be effected aswell.

This enables a user to “scroll” through the image stack and observeeffects of the variations. By way of example, with a specific predefinedvirtual illumination it is then possible to scroll along the opticalaxis of the lens and to observe the detected partial region of themeasurement object or the measurement object as a whole in differentplanes. Moreover, an, in particular automatic, assessment of therecordings with regard to usability for a measurement is made possiblein this way. The user may thus not only select the desired parametercomposition, for example the position of the focal plane in the realmeasurement, but possibly also modify, or cause to be automaticallymodified, the settings for the virtual illumination or the size of thedetected partial region until the quality of the simulated virtual imageappears to be sufficient. With regard to the quality of the imagerecording, it thus becomes possible, in particular, to identifydifferent convergence ranges of an optimization of the quality of theimage recording that are possibly present. The settings underlying thecalculation may then be accepted in the real coordinate measuringmachine and the real measurement may be carried out on this basis. Thistherefore makes it possible to avoid a time-consuming setting methoddependent on the user's experience and ability on the real coordinatemeasuring machine.

In accordance with a second aspect of the invention, a method foroptimizing an image recording of a measurement object in a coordinatemeasuring machine by an optical sensor, comprising the following steps,is provided:

-   -   providing a first data set representing a model of the        measurement object, a second data set representing a model of an        illumination of the measurement object, and a third data set        representing a model of an optics of the optical sensor,    -   simulating an image recording of at least one virtual image of        the measurement object imaged onto the optical sensor by        rendering on the basis of the first data set, the second data        set and the third data set, and    -   setting the image recording of the measurement object on the        basis of the at least one simulated virtual image of the        measurement object.

The method in accordance with the second aspect of the invention thusinvolves firstly providing a first, a second and a third data set,wherein the step of providing corresponds to that of the method inaccordance with the first aspect. Here, too, the fourth data setdescribed above may additionally be provided. A process of simulating animage recording by rendering is then likewise effected. In this case, atleast one virtual image imaged on the optical sensor is calculated. Theuser may observe said at least one virtual image or subject it to anautomated evaluation and an illumination of the measurement object maybe set or varied on the basis thereof. In this way it becomes possible,without having to perform settings on the real coordinate measuringmachine, to be able to perform a setting of an illumination on thecoordinate measuring machine more time-efficiently and without requiredexperience in handling coordinate measuring machines.

In accordance with a third aspect of the invention, a coordinatemeasuring machine for inspecting a measurement object comprising anoptical sensor and comprising a data processing device for controllingthe coordinate measuring machine is provided, wherein the dataprocessing device is configured in such a way that it performs a methodin accordance with the first aspect of the invention or one of itsrefinements or in accordance with the second aspect of the invention orone of its refinements.

A fourth aspect of the invention furthermore provides a computer programproduct comprising program code which carries out a method in accordancewith the first aspect of the invention or one of its refinements or inaccordance with the second aspect of the invention or one of itsrefinements when it is executed on a data processing device, inparticular a data processing device of a coordinate measuring machine.

The coordinate measuring machine in accordance with the third aspect andthe computer program product in accordance with the fourth aspecttherefore have the same advantages as the method in accordance with thefirst aspect of the invention or the method in accordance with thesecond aspect of the invention.

In one refinement of the method in accordance with the first aspect, thefollowing steps are furthermore carried out:

-   -   determining a parameter representing a quality of the image        recording in each virtual image of the image stack,    -   ascertaining the virtual image for which the parameter        representing the quality of the image recording takes an        optimum, and    -   defining the second and/or third data set underlying the image        recording of said virtual image as the best image recording        setting.

Consequently, firstly a parameter representing the quality of the imagerecording is thus determined in each virtual image of the image stack.Said parameter may be for example the focusing, the brightness and/orthe contrast, but in principle an arbitrary parameter may be formed forthis, in particular in the form of a “merit function” known in the areaof the optimization. This may involve an output value of a customarymethod for assessing an image recording. In the case of a focusing as aparameter of the quality, it is possible for example to choose a linelying perpendicular to an edge to be observed, and to determine abrightness gradient along this line. The image which then includes theextremum of the brightness gradient along this line may then be assessedas the image having the best focus setting.

In this way, it is then possible to ascertain the virtual image havingan optimum for the parameter representing the quality of the imagerecording. It is then possible to define the focus setting for thisvirtual image as the best image recording setting. In this way, anoptimization of the image recording may be performed for example bymeans of the method for simulating an imaging purely in a computationalmanner.

In a further refinement of the method, the following step may then beperformed:

-   -   applying the best image recording setting at least to the optics        and/or the illumination of the coordinate measuring machine.

In this way, the user may then apply the settings that are output to thereal coordinate measuring machine and thus directly carry out themeasurement with a best image recording setting.

In a further refinement of the method in accordance with the firstaspect it may be provided that a real image of the measurement object isrecorded by the optical sensor, and an image recording setting of theoptics and/or of the illumination of the coordinate measuring machine iseffected proceeding from an image recording setting of the real imagewith respect to the best image recording setting.

What may be implemented in this way is that the ultimate setting or theprocess of applying the ascertained setting for the best image recordingplane is also performed in a directly automated manner on the coordinatemeasuring machine. By way of example, as explained below, the imagerecording setting underlying the real image may be ascertained bycomparing the real image with the images of the rendered image stack andthe setting for the best image recording plane may then be performed inan automated manner proceeding from this setting. It goes without sayingthat other possibilities are also conceivable. By way of example, it isalso possible to arrange a reference object in the measurement region ofthe optical sensor, a statement about the position of the imagerecording plane being possible from the imaging of said reference objectonto the optical sensor.

Furthermore, in one refinement of the method in accordance with thefirst aspect of the invention it may be provided that, before the stepof rendering, at least one real image of the measurement object isrecorded by the optical sensor and is used as a support point for thestep of rendering.

In this way it is possible, in the step of rendering, to bring about animproved simulation of the imaging onto the optical sensor by virtue ofthe fact that, for example, actual values for a specific image may bepredefined, on the basis of which the calculation may then be effected.

In accordance with a further refinement of the method according to thefirst aspect of the invention it may be provided that the imagerecording setting of each real image is previously known.

By way of example, it may be provided that this image recording settingis stored on the basis of the position of the lens of the optical sensorand/or the arrangement of the optical elements of the lens or the opticsof the optical sensor. In this way, the image recording setting withregard to each real image of the coordinate measuring machine is knownduring the recording thereof and may be assigned to this image, suchthat it is previously known during the further use.

Furthermore, in accordance with a further refinement of the method inaccordance with the first aspect of the invention it may be providedthat, after the step of rendering, each real image is fitted into theimage stack by correlation with the virtual images of the image stackand the image recording setting of the real image is ascertainedtherefrom.

In this way, even without previously known image setting by comparingthe real recorded image with the virtual images of the image stack bymeans of a correlation, for example a pixel-to-pixel correlation, a bestcorrespondence may be found and the associated image recording settingsof the virtual image may be accepted as that of the real image.

In a further refinement of the method in accordance with the firstaspect it may be provided that a real image of the measurement object isrecorded by the optical sensor, that, after the step of rendering, thereal image is fitted into the image stack by correlation with thevirtual images of the image stack, and in that deviations between thereal image and a corresponding virtual image of the image stack areascertained. “Fitting” means classifying the real image on account ofits image recording setting into the sequence of virtual images. Forexample a real image with focus z₁+10 mm would be sorted by insertionfor instance between two virtual images with z₂=+9 mm and z₃=11 mm.

In this way it likewise becomes possible to improve the quality of thecalculations during the step of rendering. As already described above,the real image may be fitted into the image stack on the basis of acorrelation with the virtual images of the image stack. The virtualimage to which there is the best correspondence in the context of thecorrelation is then compared with the actual image. Deviations betweenthe real image and the virtual image may be ascertained in this way andused for example for improving the step of rendering if it is performedonce again. Furthermore, it becomes possible also to apply thedeviations to the virtual images for the purpose of improvement.

By way of example, in a further refinement it may be provided that abest virtual image with the best image recording setting is renderedtaking account of the deviations.

It is not necessary for the recorded real image already to have a bestimage recording setting. The rendering of the image stack may indeedhave the result that a different image having a different underlyingimage recording setting has the best image recording setting. It is thuspossible firstly to ascertain the deviations between the real image anda corresponding correlated virtual image and then to apply them to thevirtual image with the best image recording setting in order to providean improved virtual image with a best image recording setting. This maythen be used further, for example, in particular for optimizing theillumination setting.

In a further refinement of the method it may be provided that a virtualimage in a measurement plane which is a plane with an arbitrary imagerecording setting within the image stack is rendered taking account ofthe deviations.

The image plane in which a measurement is intended to be carried outneed not be the one in which the best image recording setting ispresent. Although this will generally be the case, this is notmandatory. In this respect, an arbitrary different measurement planehaving a different image recording setting than the best image recordingsetting may also be calculated in an improved manner on the basis of thedeviations ascertained.

In a further refinement of the method it may be provided that the thirddata set has previously detected aberrations of the optics of theoptical sensor, which are stored in particular in the form of a Zernikepolynomial, and the aberrations are subtracted during the rendering ofthe best virtual image or of the virtual image in a measurement plane.

It goes without saying that a Zernike polynomial for describing theaberration should be understood to be merely by way of example. Otherpolynomial approaches, series expansions or integral expansions fordescribing the wavefront aberrations of the lens of the optical sensoror of the optics are also possible, for example a Chebychev polynomial.The aberrations may be measured on the real optical sensor beforehandusing a wavefront aberrometer, for example, and then be subtracted fromthe best virtual image or the virtual image in a measurement plane. Itgoes without saying that such subtraction of the aberrations may also becarried out for any other calculated virtual image.

For this purpose, for example, in the step of rendering, furtherrefinement such as the phase-retrieval application mentioned above maybe applied in order to be able to correspondingly subtract theaberrations stored in the form of, for example, a Zernike polynomial.

In a further refinement of the method it may be provided that the regionof the measurement object in which the plurality of virtual images arerendered is larger than a region of the measurement object from whichthe real image is recorded.

In principle, for a successful correlation it is thus only necessarythat the real image and the calculated virtual image have a sufficientlylarge overlap. Therefore, one real image may also suffice to support aplurality of rendered virtual image stacks in the calculation.Furthermore, it is also possible, for example, already assuming atranslational displacement of the optical sensor parallel to the imagerecording plane, to calculate a plurality of virtual image stacksadjoining one another and then ultimately to join them together in thecalculation to form a virtual image which is larger than a region of themeasurement object from which a real image is recorded.

Joining together the virtual images or the virtual image stacks may becarried out by methods of fusing image data that are known per se, suchas, for example, the so-called “stitching” method or other methods.

In a further refinement of the method in accordance with the secondaspect of the invention, the following steps may be carried out:

-   -   ascertaining the quality of the image recording of the        measurement object by determining a value of a parameter        representing the quality from at least one of the at least one        rendered virtual image,    -   comparing the value of the parameter with a limit value, and    -   either, if the comparison is negative, varying at least the        second data set and/or the third data set, and repeating the        steps of simulating, ascertaining and comparing,    -   or, if the comparison is positive, using the second data set for        setting the image recording by the coordinate measuring machine.

In this way it becomes possible to determine the quality of the imagerecording of the measurement object in an automated manner. Theparameter representing the quality of the image recording of themeasurement object may be chosen suitably as already described. By wayof example, an averaged image brightness may also be used and/or aparticularly small difference between brightness ranges within an imagemay be demanded.

The method may then operate iteratively in an automated manner. Thevariation of the second data set may be effected for example in the formof a variation of a location and the position and/or the number of thelight sources, their light intensity, their emission angles, etc.

In a further refinement of the method, the following steps may beprovided:

-   -   ascertaining the quality of the image recording of the        measurement object by determining a value of a parameter        representing the quality from at least one of the at least one        rendered virtual image,    -   varying at least the second data set and/or the third data set        within a predetermined optimization range and repeating the        steps of simulating and ascertaining,    -   using that second data set for setting the image recording by        the coordinate measuring machine for which the parameter        representing the quality takes an optimum.

In this way, in contrast to the previous refinement, which terminatesthe variation of the second data set when a limit value criterion issatisfied, a specific optimization range is then run through andsimulated completely parametrically. For all rendered images, theparameter representing the quality of the image recording is determinedand then that image recording setting which led to the best quality isselected. Whether the “optimum” is a maximum or a minimum depends on thetype of parameter representing the quality. If a difference betweenbrightnesses within an image is used, for example, it will be a minimum.

In a further refinement it may be provided that the step of simulatingthe image recording of the at least one virtual image of the measurementobject imaged onto the optical sensor is a method according to the firstaspect of the invention or one of its refinements. The first and secondaspects can also be advantageously combined in this way.

It goes without saying that the features mentioned above and those yetto be explained below can be used not only in the combinationrespectively indicated, but also in other combinations or by themselves,without departing from the scope of the present invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

Embodiments of the invention are illustrated in the drawing and areexplained in greater detail in the following description. In thefigures:

FIG. 1 shows a schematic block diagram of a coordinate measuring machineand a computer program product,

FIG. 2 shows a schematic block diagram of one embodiment of a method foroptimizing an image recording setting of a coordinate measuring machine,

FIG. 3 shows a further embodiment of a method for optimizing an imagerecording setting of a coordinate measuring machine,

FIG. 4 shows a first embodiment of a method for simulating an imagerecording of a measurement object by an optical sensor of a coordinatemeasuring machine,

FIG. 5 shows a second embodiment of a method for simulating an imagerecording of a measurement object by an optical sensor of a coordinatemeasuring machine,

FIG. 6 shows a third embodiment of a method for simulating an imagerecording of a measurement object by an optical sensor of a coordinatemeasuring machine, and

FIG. 7 shows a fourth embodiment of a method for simulating an imagerecording of a measurement object onto an optical sensor of a coordinatemeasuring machine.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 shows a coordinate measuring machine 10. The coordinate measuringmachine 10 serves to perform image recordings of a measurement object11. For this purpose, the coordinate measuring machine 10 has an opticalsensor 12. The optical sensor 12 is a camera, for example, that is tosay an optical sensor 12 which captures a planar, that is to saytwo-dimensional, recording of the measurement object 11.

The coordinate measuring machine 10 furthermore has an optical imagingsystem or an optics 13, which is part of the optical sensor 12 andserves to image the light incident on the optical sensor 12 from themeasurement object 11 onto the optical sensor 12 in a suitable manner.

The coordinate measuring machine 10 furthermore has a data processingdevice 14, which serves to evaluate the image captured by the opticalsensor 12.

The optical sensor 12 has a capture region 15 extending in the X-Y planein the view illustrated schematically in FIG. 1. An image captured bythe optical sensor 12 thus lies parallel to the X-Y plane in the captureregion 15. The image plane or focal plane captured sharply by theoptical sensor 12 is spaced apart from the optical sensor 12 by anoptical working distance 16. The position in the Z direction may thus beinfluenced relative to the measurement object 11 by altering the settingof the optical imaging system, such that the optical working distance 16is altered. It is also possible, however, while maintaining the opticalworking distance 16, to effect a mechanical movement of the opticalsensor 12 and of the measurement object 11 relative to one another inorder to influence the position of the recorded image relative to themeasurement object 11. In this case, the measurement object 11 and/orthe optical sensor 12 may be moved. For illuminating the measurementobject 11, the coordinate measuring machine 10 has an illuminationdevice 36.

The data processing device 14 has a central data processing unit 17 thatcan carry out computation operations. Furthermore, the data processingdevice 14 has a storage unit 18, in which image data sets can be stored.A computer program product 20 may be installed which performs the methoddescribed in detail below on the data processing device 14.

Furthermore, the coordinate measuring machine 10 has an input device 22,by means of which user inputs into the data processing device 14 of thecoordinate measuring machine 10 can be performed. Measured value resultsmay be output to a user by means of a display device, for example ascreen, 24 and/or by means of a printer device 26. The display device 24and/or the printer device 26 form an output device 28.

FIG. 2 shows a first embodiment of a method for optimizing anillumination of a measurement object in a coordinate measuring machine.The method is identified generally by the reference sign 40.

After the start, there is carried out firstly a step 42 of providing afirst data set representing a model of the measurement object 11, asecond data set representing a model of an illumination 36 of themeasurement object 11, and a third data set representing a model of anoptics 13 of the optical sensor 12.

Afterward, there is carried out a step of simulating 44 at least onevirtual image of the measurement object 11 imaged onto the opticalsensor 12 by rendering on the basis of the first data set, the seconddata set and the third data set. Afterward, in one configuration, thestep of setting 46 the illumination of the measurement object 11 on thebasis of the at least one simulated virtual image of the measurementobject 11 may then be carried out directly.

In this way, the setting method with real evaluation that is otherwisecarried out on the real measurement object 11 by means of the realillumination device 36 and the real coordinate measuring machine 10 isreplaced by a complete virtual treatment by means of a CAD model of themeasurement object, a model of the coordinate measuring machine with itsillumination and a rendering of the resultant imaging onto the opticalsensor.

Instead of proceeding directly to step 46 after step 44, between thesesteps there may also firstly be carried out a step 48 of ascertainingthe quality of the illumination of the measurement object by determininga value of a parameter representing the quality from at least one of theat least one rendered virtual image. Afterward, a step 50 of varying thesecond data set within a predetermined optimization range and repeatingthe steps of simulating and ascertaining may then be carried out.Varying the second data set within a predetermined optimization rangemay be effected for example in such a way as to run through the positionand alignment of the illumination device 36 within specific positionranges and alignment angle ranges. It goes without saying that provisionmay be made for more than one illumination device 36 to be provided.Further variable parameters arise in this case.

Afterward, there may then be carried out a step 52 of using that seconddata set for setting the illumination by the coordinate measuringmachine for which the parameter representing the quality takes anoptimum.

Afterward, step 46 may then still be performed and the illumination ofthe measurement object 11 may be set by means of the second data set forwhich the parameter representing the quality takes an optimum.

FIG. 3 shows one possible second embodiment of the method 40.

Firstly, identical steps 42 and 44 are carried out. Afterward, a step 48involves ascertaining the quality of the illumination of a measurementobject by determining a value of a parameter representing the qualityfrom at least one of the at least one rendered virtual image.

A comparison of said parameter with a limit value follows in a step 54.If the interrogation is negative, the second data set, i.e. theillumination setting, is varied and the step of simulating 44 andascertaining 48 is repeated. If the interrogation is positive, afterwardstep 46 is performed with the settings and the ascertained setting ofthe illumination of the measurement object on the real coordinatemeasuring machine 10 is carried out.

FIG. 4 shows one embodiment of a method 60 for simulating an imaging onan optical sensor of a coordinate measuring machine 10 for inspecting ameasurement object 11.

Firstly there is carried out a step 62 of providing a first data setrepresenting a model of the measurement object 11, a second data setrepresenting a model of an illumination 36 of the measurement object 11,and a third data set representing a model of an optics 13 of the opticalsensor 12.

Afterward, there is carried out a step of rendering 64 an image stack 34on the basis of the first data set, the second data set and the thirddata set, wherein the image stack has a plurality of virtual images ofat least one partial region of the measurement object 11, wherein eachvirtual image is rendered at least with a different second and/ordifferent third data set.

In this way, from a known predefined optics 13, known predefinedillumination and the CAD model of the measurement object 11, an entireimage stack is simulated for further use. For the step of rendering 64it is possible to use for example a commercially available 3D engine,for example an MC Ray tracing-based 3D engine. A Monte Carlo simulationmay be performed in particular for the simulation of the optical system.

If appropriate, for the rendering in one configuration a real image maybe generated and fitted into the image stack 34 by means of correlationin order in this way to support the calculation, as will be explainedbelow.

FIG. 5 shows a further configuration of the method 60. Here, forexample, firstly steps 62 and 64 as described above may be performed.

Then a step 66 involves determining a parameter representing a qualityof the image recording in each virtual image of the image stack 34.Afterward, a step 68 involves ascertaining the virtual image for whichthe parameter representing the quality of the image recording takes anoptimum, and afterward a step 70 involves defining the image recordingsetting of this virtual image as the best image recording setting. Byway of example, the image recording setting may involve the focussing,the contrast, the brightness, a homogeneity of the brightnessdistribution or some other parameter.

On the basis thereof, in a step 72 the best image recording setting maythen be applied to the optics 13 of the coordinate measuring machine 10.In configurations, in a step 74, at the beginning at least one realimage of the measurement object 11 may be recorded and used as a supportpoint for the step of rendering. Furthermore, in one configuration it ispossible, after the step of rendering 64, to fit each real image intothe image stack by correlation with the virtual images of the imagestack and to ascertain the image recording setting of the real imagetherefrom. It may then be used, if appropriate, in a further pass of thestep of rendering 64, which is then followed again by steps 66, 68, 70and 72. Step 76 is only necessary, however, if the image recordingsettings for each real image are not already previously known beforehandduring step 74.

FIG. 6 shows a further embodiment of the method 60. Firstly, steps 62and 64 are carried out as described above. Afterward, a step 78 isperformed, which involves using the optical sensor 22 to record a realimage of the measurement object, which, after the step of rendering, isfitted into the image stack by correlation with the virtual images ofthe image stack. Deviations between the real image and the correspondingvirtual image of the image stack are then ascertained in a subsequentstep 80. This then makes it possible, in a step 82, to render a bestvirtual image taking account of the previously determined deviations.Alternatively, it is also possible, in step 82, to render a differentvirtual image of an arbitrary measurement plane with an arbitrary imagerecording setting within the image stack.

As a configuration it is furthermore possible, in a step 85, tocalculate further planes within the image stack in addition to the bestimage recording plane.

Such a method presupposes only knowledge about the desired arrangementof an alignment of the illumination, the positioning and alignment ofthe coordinate measuring machine 10 in three translational and, ifappropriate, rotational dimensions and knowledge about the optics 13 ofthe optical sensor 22. In particular, the rendering processes outlinedmay be carried out before an actual measurement, which enables acorresponding computational use and a high accuracy of the calculations.Furthermore, as already outlined initially, it is possible to use even asmall real image for supporting the rendering and/or for fitting intothe real image stack and ascertaining the deviation, said image beingsmaller than the ultimately rendered image or virtual field of view.

However, FIG. 7 also shows a fourth embodiment of the method 60.

Firstly, in a step 84 by means of a measurement, for example by means ofa wavefront aberrometer, the aberration of the lens or of the optics ofthe coordinate measuring machine is determined and stored for example inthe form of a Zernike polynomial.

The step of providing 62 can thus be effected as described above.Afterward, at least one real image may be recorded in a step 86, inorder to support step 64 of rendering. A step of rendering is to becarried out for example using the at least one real image as a startingvalue and a phase retrieval.

Subsequently, in a step 88, the at least one real image is then fittedinto the image stack rendered step 64 and the aberrations are subtractedfrom the corresponding virtual images. Deviations remaining between thereal image and the corresponding virtual image may likewise beascertained and then taken into account when determining the imagehaving a best image recording setting or an arbitrary different image inthe measurement plane within the image stack in step 82.

In this way it becomes possible, for example, in a step 86, to fit areal image into the virtual image stack and to determine its imagerecording parameters. With knowledge of the aberration of the lens, thisreal image may then be freed of the aberration influences and theresidual deviations that remained between this real image and thevirtual image may be ascertained. On the basis thereof, it is thenpossible, for example, in the best image recording setting, for asimulated image once again to be subjected to the deviations in opticsaberrations in order to generate an image as real as possible in thisplane. It goes without saying that it is also possible to free thisimage of the known aberrations in the image recording with the bestimage recording setting, for example the best focal plane, and to outputit for an assumed ideal optics or an ideal lens. This may also yield animproved depth of focus upstream and/or downstream of the plane of thebest image recording, for example the best focal plane.

Ultimately it is also conceivable to provide the newly calculated imageswith virtual optical elements in the beam path, instead of convertingthem to ideal optics. By way of example, opaque or partly transparent ordiffusely scattering media may be arranged virtually in the beam pathand the measurement object may be observed through them or through theirboundary layers.

What is claimed is:
 1. A method for operating a coordinate measuringmachine having an optical sensor and/or an illumination device forinspecting a measurement object, comprising the following steps:providing a first data set representing a model of the measurementobject, a second data set representing a model of an illumination of themeasurement object, and a third data set representing a model of anoptics of the optical sensor, and rendering an image stack on the basisof the first data set, the second data set and the third data set,wherein the image stack comprises a plurality of virtual images of atleast a partial region of the measurement object, wherein each virtualimage is rendered at least with a different second and/or differentthird data set; wherein, before the step of rendering, at least one realimage of the measurement object is recorded by the optical sensor and isused as a support point for the step of rendering, wherein the region ofthe measurement object in which the plurality of virtual images arerendered is lamer than a region of the measurement object from which thereal image is recorded; and the further step of adjusting the settingsof the optics and/or the illumination device of the coordinate measuringmachine in accordance with the settings in the virtual image identifiedas having the best quality.
 2. The method as claimed in claim 1, furthercomprising the following steps: determining a parameter representing aquality of the image recording in each virtual image of the image stack,ascertaining the virtual image for which the parameter representing thequality of the image recording takes an optimum, and defining the secondand/or third data set underlying the image recording of said virtualimage as the best image recording setting.
 3. The method as claimed inclaim 2, wherein an image recording setting of the optics and/or of theillumination device of the coordinate measuring machine is effectedproceeding from an image recording setting of the real image withrespect to the best image recording setting.
 4. The method as claimed inclaim 3, wherein the image recording setting of each real image ispreviously known.
 5. A method for operating a coordinate measuringmachine having an optical sensor and/or an illumination device forinspecting a measurement object, comprising the following steps:providing a first data set representing a model of the measurementobject, a second data set representing a model of an illumination of themeasurement object, and a third data set representing a model of anoptics of the optical sensor, and rendering an image stack on the basisof the first data set, the second data set and the third data set,wherein the image stack has a plurality of virtual images of at least apartial region of the measurement object, wherein each virtual image isrendered at least with a different second and/or different third dataset, the method further comprising the following steps: determining aparameter representing a quality of the image recording in each virtualimage of the image stack, ascertaining the virtual image for which theparameter representing the quality of the image recording takes anoptimum, defining the second and/or third data set underlying the imagerecording of said virtual image as the best image recording setting, andapplying the best image recording setting at least to the optics and/orto the illumination device of the coordinate measuring machine, whereina real image of the measurement object is recorded by the opticalsensor, and an image recording setting of the optics and/or of theillumination of the coordinate measuring machine is effected proceedingfrom an image recording setting of the real image with respect to thebest image recording setting, and wherein, after the step of rendering,each real image is fitted into the image stack by correlation with thevirtual images of the image stack and the image recording setting of thereal image is thereby ascertained.
 6. A method for operating acoordinate measuring machine having an optical sensor and/or anillumination device for inspecting a measurement object, comprising thefollowing steps: providing a first data set representing a model of themeasurement object, a second data set representing a model of anillumination of the measurement object, and a third data setrepresenting a model of an optics of the optical sensor, and renderingan image stack on the basis of the first data set, the second data setand the third data set, wherein the image stack has a plurality ofvirtual images of at least a partial region of the measurement object,wherein each virtual image is rendered at least with a different secondand/or different third data set, wherein a real image of the measurementobject is recorded by the optical sensor, wherein after the step ofrendering, the real image is fitted into the image stack by correlationwith the virtual images of the image stack, and wherein deviationsbetween the real image and a corresponding virtual image of the imagestack are ascertained.
 7. The method as claimed in claim 6, wherein abest virtual image with the best image recording setting is renderedtaking account of the deviations.
 8. The method as claimed in claim 6,wherein a virtual image in a measurement plane which is a plane with anarbitrary image recording setting within the image stack is renderedtaking account of the deviations.
 9. The method as claimed in claim 6,wherein the third data set has previously detected aberrations of theoptics of the optical sensor and the aberrations are subtracted duringthe rendering of the best virtual image or of the virtual image in ameasurement plane.
 10. The method as claimed in claim 9, wherein thepreviously detected aberrations of the optics of the optical sensor arestored in the form of a Zernike polynomial.
 11. A method for optimizingan image recording of a measurement object in a coordinate measuringmachine by an optical sensor, comprising the following steps: providinga first data set representing a model of the measurement object, asecond data set representing a model of an illumination of themeasurement object, and a third data set representing a model of anoptics of the optical sensor, simulating an image recording of at leastone virtual image of the measurement object imaged onto the opticalsensor by rendering on the basis of the first data set, the second dataset and the third data set, and setting the image recording of themeasurement object on the basis of the at least one simulated virtualimage of the measurement object, wherein the step of simulating theimage recording of the at least one virtual image of the measurementobject imaged onto the optical sensor is a method for operating acoordinate measuring machine having an optical sensor and/or anillumination device for inspecting a measurement object, comprises thefollowing steps: providing a first data set representing a model of themeasurement object, a second data set representing a model of anillumination of the measurement object, and a third data setrepresenting a model of an optics of the optical sensor, and renderingan image stack on the basis of the first data set, the second data setand the third data set, wherein the image stack has a plurality ofvirtual images of at least a partial region of the measurement object,wherein each virtual image is rendered at least with a different secondand/or different third data set, wherein a real image of the measurementobject is recorded by the optical sensor, wherein after the step ofrendering, the real image is fitted into the image stack by correlationwith the virtual images of the image stack, and wherein deviationsbetween the real image and a corresponding virtual image of the imagestack are ascertained.
 12. A method for operating a coordinate measuringmachine having an optical sensor and/or an illumination device forinspecting a measurement object, comprising the following steps:providing a first data set representing a model of the measurementobject, a second data set representing a model of an illumination of themeasurement object, and a third data set representing a model of anoptics of the optical sensor, simulating an image recording of at leastone virtual image of the measurement object imaged onto the opticalsensor by rendering on the basis of the first data set, the second dataset and the third data set, and setting the image recording of themeasurement object on the basis of the at least one simulated virtualimage of the measurement object, ascertaining the quality of the imagerecording of the measurement object by determining a value of aparameter representing the quality from at least one of the at least onerendered virtual image, comparing the value of the parameter with alimit value, and either, if the comparison is negative, varying at leastthe second data set and/or the third data set, and repeating the stepsof simulating, ascertaining and comparing, or, if the comparison ispositive, using the second data set for setting the image recording bythe coordinate measuring machine.
 13. A method for operating acoordinate measuring machine having an optical sensor and/or anillumination device for inspecting a measurement object, comprising thefollowing steps: providing a first data set representing a model of themeasurement object, a second data set representing a model of anillumination of the measurement object, and a third data setrepresenting a model of an optics of the optical sensor, simulating animage recording of at least one virtual image of the measurement objectimaged onto the optical sensor by rendering on the basis of the firstdata set, the second data set and the third data set, and setting theimage recording of the measurement object on the basis of the at leastone simulated virtual image of the measurement object, ascertaining thequality of the image recording of the measurement object by determininga value of a parameter representing the quality from at least one of theat least one rendered virtual image, varying at least the second dataset and/or the third data set within a predetermined optimization rangeand repeating the steps of simulating and ascertaining, using thatsecond data set for setting the image recording by the coordinatemeasuring machine for which the parameter representing the quality takesan optimum.
 14. A coordinate measuring machine for inspecting ameasurement object, comprising an optical sensor and comprising a dataprocessing device for controlling the coordinate measuring machine,wherein the data processing device is configured in such a way that itperforms a method for simulating an image recording by an optical sensorof a coordinate measuring machine for inspecting a measurement object,wherein the method for simulating comprises the following steps:providing a first data set representing a model of the measurementobject, a second data set representing a model of an illumination of themeasurement object, and a third data set representing a model of anoptics of the optical sensor, and rendering an image stack on the basisof the first data set, the second data set and the third data set,wherein the image stack has a plurality of virtual images of at least apartial region of the measurement object, wherein each virtual image isrendered at least with a different second and/or different third dataset wherein a real image of the measurement object is recorded by theoptical sensor, wherein after the step of rendering, the real image isfitted into the image stack by correlation with the virtual images ofthe image stack, and wherein deviations between the real image and acorresponding virtual image of the image stack are ascertained.
 15. Anon-transitory computer-readable storage medium containing a computerprogram comprising program code which, when executed on a dataprocessing device, carries out a process for operating a coordinatemeasuring machine having an optical sensor and/or an illumination devicefor inspecting a measurement object, wherein the method for simulatingcomprises the following steps: providing a first data set representing amodel of the measurement object, a second data set representing a modelof an illumination of the measurement object, and a third data setrepresenting a model of an optics of the optical sensor, and renderingan image stack on the basis of the first data set, the second data setand the third data set, wherein the image stack has a plurality ofvirtual images of at least a partial region of the measurement object,wherein each virtual image is rendered at least with a different secondand/or different third data set, wherein a real image of the measurementobject is recorded by the optical sensor, wherein after the step ofrendering, the real image is fitted into the image stack by correlationwith the virtual images of the image stack, and wherein deviationsbetween the real image and a corresponding virtual image of the imagestack are ascertained.
 16. The computer-readable storage medium asclaimed in claim 15, wherein the data processing device is a dataprocessing device of a coordinate measuring machine.